/*
    VKChecker - plasmoid used to check messages from VK.COM
    Copyright (C) 2010  Igor Poboiko

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

#include "vkclient.h"

#include <kjob.h>
#include <kdebug.h>

VKClient::VKClient(QObject* parent): 
	QObject(parent)
{
	m_loginReqiured = false;
	m_login = "";
	m_password = "";
}

VKClient::~VKClient()
{

}

void VKClient::setLoginInfo(QString login, QString password)
{
	kDebug() << "called.";
	if (login != m_login || password != m_password)
	{
		m_loginReqiured = true;
	}
	m_login = login;
	m_password = password;
}

void VKClient::checkMail()
{
	if (m_loginReqiured)
	{
		kDebug() << "login required, starting login job";
		// TODO: Start login job here
		return;
	}
	kDebug() << "starting mail-check job";
	// TODO: Start check job here
}